<?php /* Smarty version 2.6.12, created on 2008-10-30 15:53:42
         compiled from admin/main/taxes.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'admin/main/taxes.tpl', 53, false),array('modifier', 'replace', 'admin/main/taxes.tpl', 55, false),array('modifier', 'substitute', 'admin/main/taxes.tpl', 57, false),array('modifier', 'strip_tags', 'admin/main/taxes.tpl', 74, false),array('modifier', 'escape', 'admin/main/taxes.tpl', 74, false),)), $this); ?>
<?php func_load_lang($this, "admin/main/taxes.tpl","lbl_taxes,txt_taxes_general_note,lbl_check_all,lbl_uncheck_all,lbl_tax_name,lbl_tax_apply_to,lbl_tax_priority,lbl_status,txt_N_rates_defined,lbl_enabled,lbl_disabled,lbl_update,lbl_delete_selected,lbl_apply_selected_taxes_to_all_products,txt_no_taxes_defined,lbl_add_new_,lbl_taxes,opt_display_taxed_order_totals,opt_display_cart_products_tax_rates,opt_enable_user_tax_exemption,opt_allow_user_modify_tax_number,lbl_update,option_title_Taxes"); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "page_title.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_taxes'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php echo $this->_tpl_vars['lng']['txt_taxes_general_note']; ?>


<br /><br />

<!-- IN THIS SECTION -->

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog_tools.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<!-- IN THIS SECTION -->

<br />

<?php ob_start(); ?>

<?php if ($this->_tpl_vars['taxes']):  $this->assign('colspan', '5'); ?>

<script type="text/javascript" language="JavaScript 1.2">
<!--
checkboxes_form = 'taxesform';
checkboxes = new Array(<?php $_from = $this->_tpl_vars['taxes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
 if ($this->_tpl_vars['k'] > 0): ?>,<?php endif; ?>'to_delete[<?php echo $this->_tpl_vars['v']['taxid']; ?>
]'<?php endforeach; endif; unset($_from); ?>);

-->
</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/include_js.tpl", 'smarty_include_vars' => array('src' => "change_all_checkboxes.js")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div style="line-height:170%"><a href="javascript:change_all(true);"><?php echo $this->_tpl_vars['lng']['lbl_check_all']; ?>
</a> / <a href="javascript:change_all(false);"><?php echo $this->_tpl_vars['lng']['lbl_uncheck_all']; ?>
</a></div>

<?php else:  $this->assign('colspan', '4');  endif; ?>

<form action="taxes.php" method="post" name="taxesform">
<input type="hidden" name="mode" value="update" />

<table cellpadding="3" cellspacing="1" width="100%">

<tr class="TableHead">
	<?php if ($this->_tpl_vars['taxes']): ?><td>&nbsp;</td><?php endif; ?>
	<td width="30%"><?php echo $this->_tpl_vars['lng']['lbl_tax_name']; ?>
</td>
	<td width="30%" align="center"><?php echo $this->_tpl_vars['lng']['lbl_tax_apply_to']; ?>
</td>
	<td width="20%" align="center"><?php echo $this->_tpl_vars['lng']['lbl_tax_priority']; ?>
</td>
	<td width="20%" align="center"><?php echo $this->_tpl_vars['lng']['lbl_status']; ?>
</td>
</tr>

<?php if ($this->_tpl_vars['taxes']): ?>

<?php unset($this->_sections['tax']);
$this->_sections['tax']['name'] = 'tax';
$this->_sections['tax']['loop'] = is_array($_loop=$this->_tpl_vars['taxes']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['tax']['show'] = true;
$this->_sections['tax']['max'] = $this->_sections['tax']['loop'];
$this->_sections['tax']['step'] = 1;
$this->_sections['tax']['start'] = $this->_sections['tax']['step'] > 0 ? 0 : $this->_sections['tax']['loop']-1;
if ($this->_sections['tax']['show']) {
    $this->_sections['tax']['total'] = $this->_sections['tax']['loop'];
    if ($this->_sections['tax']['total'] == 0)
        $this->_sections['tax']['show'] = false;
} else
    $this->_sections['tax']['total'] = 0;
if ($this->_sections['tax']['show']):

            for ($this->_sections['tax']['index'] = $this->_sections['tax']['start'], $this->_sections['tax']['iteration'] = 1;
                 $this->_sections['tax']['iteration'] <= $this->_sections['tax']['total'];
                 $this->_sections['tax']['index'] += $this->_sections['tax']['step'], $this->_sections['tax']['iteration']++):
$this->_sections['tax']['rownum'] = $this->_sections['tax']['iteration'];
$this->_sections['tax']['index_prev'] = $this->_sections['tax']['index'] - $this->_sections['tax']['step'];
$this->_sections['tax']['index_next'] = $this->_sections['tax']['index'] + $this->_sections['tax']['step'];
$this->_sections['tax']['first']      = ($this->_sections['tax']['iteration'] == 1);
$this->_sections['tax']['last']       = ($this->_sections['tax']['iteration'] == $this->_sections['tax']['total']);
?>

<tr<?php echo smarty_function_cycle(array('values' => ", class='TableSubHead'"), $this);?>
>
	<td><input type="checkbox" name="to_delete[<?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['taxid']; ?>
]" /></td>
	<td class="FormButton"><a href="taxes.php?taxid=<?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['taxid']; ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['tax_name'])) ? $this->_run_mod_handler('replace', true, $_tmp, ' ', "&nbsp;") : smarty_modifier_replace($_tmp, ' ', "&nbsp;")); ?>
</a>
<?php if ($this->_tpl_vars['active_modules']['Simple_Mode'] != "" || $this->_tpl_vars['usertype'] == 'P'): ?>
(<?php echo ((is_array($_tmp=$this->_tpl_vars['lng']['txt_N_rates_defined'])) ? $this->_run_mod_handler('substitute', true, $_tmp, 'rates', $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['rates_count']) : smarty_modifier_substitute($_tmp, 'rates', $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['rates_count'])); ?>
)
<?php endif; ?>
	</td>
	<td align="center"><a href="taxes.php?taxid=<?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['taxid']; ?>
"><?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['formula']; ?>
</a></td>
	<td align="center"><input type="text" size="5" name="posted_data[<?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['taxid']; ?>
][tax_priority]" value="<?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['priority']; ?>
" /></td>
	<td align="center">
	<select name="posted_data[<?php echo $this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['taxid']; ?>
][active]">
		<option value="Y"<?php if ($this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['active'] == 'Y'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lng']['lbl_enabled']; ?>
</option>
		<option value="N"<?php if ($this->_tpl_vars['taxes'][$this->_sections['tax']['index']]['active'] == 'N'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lng']['lbl_disabled']; ?>
</option>
	</select>
	</td>
</tr>

<?php endfor; endif; ?>

<tr>
	<td colspan="<?php echo $this->_tpl_vars['colspan']; ?>
" class="SubmitBox">
<input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_update'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_delete_selected'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: if (checkMarks(this.form, new RegExp('to_delete\[[0-9]+\]', 'gi'))) submitForm(this, 'delete');" />
<?php if ($this->_tpl_vars['active_modules']['Simple_Mode']): ?>
<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_apply_selected_taxes_to_all_products'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: if (checkMarks(this.form, new RegExp('to_delete\[[0-9]+\]', 'gi'))) submitForm(this, 'apply');" />
<?php endif; ?>
	</td>
</tr>

<?php else: ?>

<tr>
	<td colspan="<?php echo $this->_tpl_vars['colspan']; ?>
" align="center"><?php echo $this->_tpl_vars['lng']['txt_no_taxes_defined']; ?>
</td>
</tr>

<?php endif; ?>

</table>
</form>

<br /><br />

<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_add_new_'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: self.location='taxes.php?mode=add';" />

<br />

<?php $this->_smarty_vars['capture']['dialog'] = ob_get_contents(); ob_end_clean();  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_taxes'],'content' => $this->_smarty_vars['capture']['dialog'],'extra' => 'width="100%"')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>


<?php if ($this->_tpl_vars['taxes']): ?>

<br /><br />

<?php ob_start(); ?>

<form action="taxes.php" method="post" name="taxesform_options">
<input type="hidden" name="mode" value="tax_options" />
<input type="hidden" name="posted_data[display_taxed_order_totals]" value="N" />
<input type="hidden" name="posted_data[display_cart_products_tax_rates]" value="N" />
<input type="hidden" name="posted_data[enable_user_tax_exemption]" value="N" />
<input type="hidden" name="posted_data[allow_user_modify_tax_number]" value="N" />

<table cellpadding="3" cellspacing="1">

<tr>
	<td width="50%"><label for="display_taxed_order_totals"><?php echo $this->_tpl_vars['lng']['opt_display_taxed_order_totals']; ?>
:</label></td>
	<td width="50%">
<input type="checkbox" id="display_taxed_order_totals" name="posted_data[display_taxed_order_totals]" value="Y"<?php if ($this->_tpl_vars['config']['Taxes']['display_taxed_order_totals'] == 'Y'): ?> checked="checked"<?php endif; ?> />
	</td>
</tr>

<tr>
	<td><label for="display_cart_products_tax_rates"><?php echo $this->_tpl_vars['lng']['opt_display_cart_products_tax_rates']; ?>
:</label></td>
	<td>
<input type="checkbox" id="display_cart_products_tax_rates" name="posted_data[display_cart_products_tax_rates]" value="Y"<?php if ($this->_tpl_vars['config']['Taxes']['display_cart_products_tax_rates'] == 'Y'): ?> checked="checked"<?php endif; ?> />
	</td>
</tr>

<tr>
	<td><label for="enable_user_tax_exemption"><?php echo $this->_tpl_vars['lng']['opt_enable_user_tax_exemption']; ?>
:</label></td>
	<td>
<input type="checkbox" id="enable_user_tax_exemption" name="posted_data[enable_user_tax_exemption]" value="Y"<?php if ($this->_tpl_vars['config']['Taxes']['enable_user_tax_exemption'] == 'Y'): ?> checked="checked"<?php endif; ?> />
	</td>
</tr>

<tr>
	<td><label for="allow_user_modify_tax_number"><?php echo $this->_tpl_vars['lng']['opt_allow_user_modify_tax_number']; ?>
:</label></td>
	<td>
<input type="checkbox" id="allow_user_modify_tax_number" name="posted_data[allow_user_modify_tax_number]" value="Y"<?php if ($this->_tpl_vars['config']['Taxes']['allow_user_modify_tax_number'] == 'Y'): ?> checked="checked"<?php endif; ?> />
	</td>
</tr>


<tr>
	<td colspan="2" class="SubmitBox"><input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_update'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /></td>
</tr>

</table>
</form>

<?php $this->_smarty_vars['capture']['dialog'] = ob_get_contents(); ob_end_clean();  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['option_title_Taxes'],'content' => $this->_smarty_vars['capture']['dialog'],'extra' => 'width="100%"')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php endif; ?>
